package com.perfect.dao;



import com.perfect.base.BaseMapper;
import com.perfect.base.BaseQuery;
import com.perfect.model.DiscountDataModel;
import com.perfect.model.DiscountModel;
import com.perfect.vo.Discount;
import org.apache.ibatis.annotations.MapKey;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

public interface DiscountMapper extends BaseMapper<Discount,Integer> {

    /**
     * 自定义多条件查询
     * @param baseQuery
     * @return
     * @throws DataAccessException
     */
    public List<DiscountModel> selectDiscountlistByParams(BaseQuery baseQuery);

    /**
     * 查询优惠券类型
     * @return
     */
    @MapKey("id")
    public List<Map<String, Object>> selectDiscountType();

    /**
     * 通过id查询优惠券详情
     * @return
     */
    public DiscountDataModel selectDiscountDataById(Integer id);
}